//欧拉筛+快速幂+分治求等比数列和+分解质因数+约数和定理
#include <iostream>

using namespace std;

const int N = 2e4 + 10, mod = 9901;

int primes[N], cnt;
bool st[N];

int res = 1;

int n, m;

void init(int x)
{
	for (int i = 2; i <= x; i ++ )
	{
		if (!st[i]) primes[cnt ++ ] = i;
		for (int j = 0; primes[j] * i <= x; j ++ )
		{
			st[primes[j] * i] = true;
			if (i % primes[j] == 0) break;
		}
	}
}

int qmi(int a, int b)
{
	int res = 1 % mod;
	
	a %= mod;
	
	while (b)
	{
		if (b & 1) res = res * a % mod;
		a = a * a % mod;
		b >>= 1;
	}
	
	return res;
}

int sum(int p, int k)
{
	if (k == 1) return 1;
	if (k & 1) return (sum(p, k - 1) + qmi(p, k - 1)) % mod;
	else return (1 + qmi(p, k / 2)) * sum(p, k / 2) % mod; 
}

int main()
{
	scanf("%d%d", &n, &m);
	
	init(N - 1);
	
	for (int i = 0; primes[i] * primes[i] <= n; i ++ )
	{

		int p = primes[i];
		if (n % p == 0)
		{
			int s = 0;
			while (n % p == 0)
			{
				n /= p;
				s ++ ;
			}
			
			int t = sum(p, s * m + 1);
//			for (int j = 0; j < m * s; j ++ ) t = (t * p + 1) % mod;
			res = (res * t) % mod;
		}
	}
	
	if(n > 1)
	{
		int t = sum(n, m + 1);
//		for (int j = 0; j < m; j ++ ) t = (t * n + 1) % mod;
		res = (res * t) % mod;
	} 
	else if (n == 0) res = 0;
		
	cout << res << endl;

	return 0;
}		

//-------------------------------------
//利用等比数列通项公式，利用到了乘法逆元的存在和使用，其他的都一样
#include <iostream>

using namespace std;

const int N = 2e4 + 10, mod = 9901;

int primes[N], cnt;
bool st[N];

int res = 1;

int n, m;

void init(int x)
{
	for (int i = 2; i <= x; i ++ )
	{
		if (!st[i]) primes[cnt ++ ] = i;
		for (int j = 0; primes[j] * i <= x; j ++ )
		{
			st[primes[j] * i] = true;
			if (i % primes[j] == 0) break;
		}
	}
}

int qmi(int a, int b)
{
	int res = 1 % mod;
	
	a %= mod;
	
	while (b)
	{
		if (b & 1) res = res * a % mod;
		a = a * a % mod;
		b >>= 1;
	}
	
	return res;
}

int main()
{
	scanf("%d%d", &n, &m);
	
	init(N - 1);
	
	for (int i = 0; primes[i] * primes[i] <= n; i ++ )
	{

		int p = primes[i];
		if (n % p == 0)
		{
			int s = 0;
			while (n % p == 0)
			{
				n /= p;
				s ++ ;
			}
			
			if ((p - 1) % mod == 0)//乘法逆元不存在
			{
				res = (s * m + 1) * res % mod;
			}
			else 
			{
				res = res * (qmi(p, s * m + 1) - 1) % mod * qmi(p - 1, mod - 2) % mod;
			}
		}
	}
	
	if(n > 1)
	{
		if ((n - 1) % mod == 0)//当乘法逆元不存在时
		{
			res = (m + 1) * res % mod;
		}
		else 
		{
			res = res * (qmi(n, m + 1) - 1) % mod * qmi(n - 1, mod - 2) % mod;
		}
		
	} 
	else if (n == 0) res = 0;
		
	cout << (res % mod + mod) % mod << endl;

	return 0;
}		